#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>


int main(void)
{
    int *p=(int *)malloc(sizeof(int)*25);
    
    printf("p指向内存大小:%ld\n",malloc_usable_size(p));
    printf("%p\n",p);
    
    p=realloc(p,sizeof(int)*100);
    printf("p指向内存大小:%ld\n",malloc_usable_size(p));
    printf("%p\n",p);

    //缩小内存
    p=realloc(p,sizeof(int)*50);
     printf("p指向内存大小:%ld\n",malloc_usable_size(p));
    printf("%p\n",p);
    return 0;
}